/**
 * 左侧导航
 */
define(function (require) {
    'use strict';
    var $ = require('jquery');
    var environment = require('environment');
    require('/static_public/js/token');
    var NavManager = require('/static_public/public_menu/navManager');
    return {
        init: function () {
            new NavManager($('#nav'), [
                {
                    'id': 'menu_home',
                    'code': '',
                    'name': '首页',
                    'level': 1,
                    'iconCls': 'icon-home',
                    'url': ['/page/palm_sales/index.shtml', '/page/palm_sales/'],
                    'children': null
                },
                {
                    'id': 'menu_ditch_manage',
                    'code': '',
                    'name': '渠道管理',
                    'level': 1,
                    'iconCls': 'icon-ditchManage',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_ditch_manage_5',
                            'code': '500701',
                            'name': '规则管理',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/ditch/index.shtml?code=ruleSet']
                        },
                        {
                            'id': 'menu_ditch_manage_6',
                            'code': '500702',
                            'name': '判客分配',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/ditch/index.shtml?code=guestAllot','/page/ditch/index.shtml?code=guestAllot&proj_id={placeholder_}']
                        }
                    ]
                },
                {
                    'id': 'menu_ztcsh',
                    'code': '',
                    'name': '秒杀活动',
                    'level': 1,
                    'iconCls': 'icon-ms',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'menu_ztcsh_1',
                            'code': '50200102',
                            'name': '楼盘管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.ztcsh+'/index.php?r=yunke/index&menu=selling/building/list']
                        },
                        {
                            'id': 'menu_ztcsh_2',
                            'code': '50200101',
                            'name': '店铺管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.ztcsh+'/index.php?r=yunke/index&menu=banner/list']
                        },
                        {
                            'id': 'menu_ztcsh_3',
                            'code': '50200104',
                            'name': '秒杀活动管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.ztcsh+'/index.php?r=yunke/index&menu=selling/seckillActivity/list']
                        },
                        {
                            'id': 'menu_ztcsh_4',
                            'code': '50200103',
                            'name': '秒杀单管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.ztcsh+'/index.php?r=yunke/index&menu=seckill-order/list']
                        }
                    ]
                },
                {
                    'id': 'user_management',
                    'code': '',
                    'name': '认筹理财',
                    'level': 1,
                    'iconCls': 'icon-finance',
                    'url': '',
                    'cls':'icon-fav',
                    'children': [
                        {
                            'id': 'role_authorization',
                            'code': '502101',
                            'name': '认筹活动管理',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/raise_finance/activities.shtml']
                        },
                        {
                            'id': 'org_management',
                            'code': '502102',
                            'name': '认筹订单管理',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/raise_finance/orders.shtml']
                        },
                        {
                            'id': 'org_management',
                            'code': '502103',
                            'name': '店铺管理',
                            'level': 2,
                            'target': '_blank',
                            'url': ['/page/raise_finance/banners.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_020_3',
                    'code': '500901',
                    'name': '微楼书（新版）',
                    'level': 1,
                    'iconCls': 'icon-new-wls',
                    'url': '',
                    'cls':'icon-fav',
                    'children' : [
                        {
                            'id': 'wls_lsgl',
                            'code': '500901',
                            'name': '楼书管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.wls+'/wls/index.html#/loushu/list']
                        },
                        {
                            'id': 'wls_lpgl',
                            'code': '500902',
                            'name': '楼盘管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.wls+'/wls/index.html#/building/list']
                        },
                        {
                            'id': 'wls_hdgl',
                            'code': '500903',
                            'name': '活动管理',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.wls+'/wls/index.html#/party/list']
                        },
                        {
                            'id': 'menu_yykf',
                            'code': '',
                            'name': '预约看房',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.qmyx+'/page/appointment/activities.shtml']
                        }
                    ]
                },
                {
                    'id': 'menu_ydxs',
                    'code': '',
                    'name': '移动销售',
                    'level': 1,
                    'iconCls': 'icon-ydxs',
                    'cls' : 'c-mvp not-ydxs icon-fav',
                    'url': '',
                    'children' : [
                        {
                            'id': 'user_admin',
                            'name': '成员管理',
                            'code': '500601',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url':['/ydxs_static/page/user_manage/member_manage.html']
                        },
                        {
                            'id': 'saleTeam',
                            'name': '销售团队管理',
                            'code': '500602',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url':['/ydxs_static/page/user_manage/salesteam_manage.html']
                        },
                        {
                            'id': 'cst_follow',
                            'name': '客户跟进管理',
                            'code': '50020304',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': false,
                            'url': ['/ydxs_static/page/service_manage/customerFollow_manage.html']
                        },
                        {
                            'id': 'cst_assign',
                            'name': '客户分配',
                            'code': '50020305',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=cst_assign']
                        },
                        {
                            'id': 'paramsSetting',
                            'name': '参数设置',
                            'code': '50020203',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=paramsSetting']
                        },
                        {
                            'id': 'erpi_nterface_set',
                            'name': 'ERP接口配置',
                            'code': '50020207',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=erpi_nterface_set']
                        },
                        {
                            'id': 'sales_data_init',
                            'name': '数据初始化',
                            'code': '50020204',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=sales_data_init']
                        },
                        {
                            'id': 'custom_page',
                            'name': '定制页面',
                            'code': '50020206',
                            'level': 2,
                            'target': '_blank',
                            'showInIframe': true,
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=custom_page']
                        },
                        {
                            'id': 'cstSyncExcep',
                            'name': '客户同步监控',
                            'code': '500205',
                            'level': 2,
                            'target': '_blank',
                            'url': [environment.mysrc + '/ydxs_static/page/proxy.ashx?code=cstSyncExcep']
                        }
                    ]
                }
                /*{
                    'id': 'menu_yykf',
                    'code': '',
                    'name': '预约看房',
                    'level': 1,
                    'iconCls': 'icon-yykf',
                    'url': ['/page/appointment/activities.shtml'],
                    'children': null
                }*/
            ]);
        }
    };
});
